set -g prefix ^g    # 前缀设置为 <C-g>
unbind ^b           # 解绑 <C-b>
# set-option -g status-utf8 on  # 开启状态栏目UTF-8支持

set-option -sg escape-time 10
set-option -g focus-events on

# set shell
set -g default-command /usr/bin/fish
set -g default-shell /usr/bin/fish

# ！！！importent！！！ 开启24 bit color 其他方式都无效
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"

# cp mode
set-window-option -g mode-keys vi # 复制模式中的默认键盘布局使用vi
bind h select-pane -L   # h -- left
bind l select-pane -R   # l -- right
bind k select-pane -U   # k -- up
bind j select-pane -D   # j -- down

# Tmux Plugin Manager
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# https://andrewjamesjohnson.com/restoring-tmux-sessions/
# tmux-resurrect enalbes saving and restoring tmux sessions manally
set -g @plugin 'tmux-plugins/tmux-resurrect'
# tmux-continuum saves automatically and allows for automatically restoring from the last save when tmux is started.
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
